package log

import (
	"gitee.com/mkwchecking/sr-core/log/ilog"
	"github.com/go-kratos/kratos/v2/log"
)

var _ log.Logger = (*KLogWrap)(nil)

func NewKlog(log ilog.Logger) log.Logger {
	return &KLogWrap{log: log}
}

type KLogWrap struct {
	log ilog.Logger
}

// Log implements log.Logger.s
func (k *KLogWrap) Log(level log.Level, keyvals ...interface{}) error {
	return k.log.Log(ilog.LevelFromKlog(level), keyvals...)
}
